clear

capture cd "/Users/iowastate/Dropbox/SET project"
capture cd "/Users/davidpeterson/Dropbox/SET project"
capture cd "/Users/daveamp/Dropbox/SET project"
use "/Users/iowastate/Dropbox/SET project/biederman.dta", clear

summ v19 v20 v23
ttest v19, by(treatment)
ttest v20, by(treatment)
ttest v23, by(treatment)

ologit v19 treatment
ologit v20 treatment
ologit v23 treatment


save "biederman2.dta", replace


use "/Users/iowastate/Dropbox/SET project/ditonto.dta", clear
summ v19 v20 v23
ttest v19, by(treatment)
ttest v20, by(treatment)
ttest v23, by(treatment)

ologit v19 treatment
ologit v20 treatment
ologit v23 treatment

save "ditonto2.dta", replace



use "/Users/iowastate/Dropbox/SET project/roe.dta", clear
summ v19 v20 v23
ttest v19, by(treatment)
ttest v20, by(treatment)
ttest v23, by(treatment)

ologit v19 treatment
ologit v20 treatment
ologit v23 treatment


save "roe2.dta", replace


use "/Users/iowastate/Dropbox/SET project/andersen.dta", clear
summ v19 v20 v23
ttest v19, by(treatment)
ttest v20, by(treatment)
ttest v23, by(treatment)

ologit v19 treatment
ologit v20 treatment
ologit v23 treatment

save "andersen2.dta", replace

use "/Users/iowastate/Dropbox/SET project/andersen.dta", clear
summ v19 v20 v23
ttest v19, by(treatment)
ttest v20, by(treatment)
ttest v23, by(treatment)

ologit v19 treatment
ologit v20 treatment
ologit v23 treatment

save "andersen2.dta", replace


use "merged-id.dta"
**testing the main hypotheses
bysort female: summ v19 v20 v23
bysort female: ttest v19, by(treatment)
bysort female: ttest v20, by(treatment)
bysort female: ttest v23, by(treatment)

bysort female: ologit v19 treatment
bysort female: ologit v20 treatment
bysort female: ologit v23 treatment



**test for effect of student gender
bysort female: ologit v19 treatment##studentsex
bysort female: ologit v20 treatment##studentsex
bysort female: ologit v23 treatment##studentsex


**test the effect of student gender by making the treatment separate by sex

gen treatfemale = treatment*studentsex
gen treatmale = treatment *(1-studentsex)

bysort female: ologit v19 treatfemale treatmale studentsex
bysort female: ologit v20 treatfemale treatmale studentsex
bysort female: ologit v23 treatfemale treatmale studentsex



**balance tests
**textbook
ttest v25, by(treatment)
**outside
ttest v26, by(treatment)
**inclass
ttest v27, by(treatment)
**difficulty
ttest v28, by(treatment)
**hours
ttest v29, by(treatment)
**valuable
ttest v30, by(treatment)
**GPA
ttest v31, by(treatment)
**grade
ttest v32, by(treatment)
**Class
ttest v33, by(treatment)
